import java.util.Scanner;

public class Test1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        double weight = in.nextDouble();
        char c = in.nextLine().charAt(1);
        int ret = 20;
        if (weight > 1) {
            ret += (int)Math.ceil(weight-1);
        }
        if (c == 'y') {
            ret += 5;
        }
        System.out.println(ret);
    }
}
